package it.univaq.mwt.arssa.business.impl;

import it.univaq.mwt.arssa.business.ArssaBusinessFactory;
import it.univaq.mwt.arssa.business.AttivitaService;
import it.univaq.mwt.arssa.business.DipendentiService;
import it.univaq.mwt.arssa.business.FerieService;
import it.univaq.mwt.arssa.business.GiorniLavorativiService;
import it.univaq.mwt.arssa.business.PermessiService;
import it.univaq.mwt.arssa.business.PresenzeService;
import it.univaq.mwt.arssa.business.RuoliService;
import it.univaq.mwt.arssa.business.SecurityService;
import it.univaq.mwt.arssa.business.SediService;

import javax.sql.DataSource;

public class JDBCArssaBusinessFactory extends ArssaBusinessFactory{
	
	private DataSource dataSource;
	
	public JDBCArssaBusinessFactory (DataSource dataSource){
		this.dataSource = dataSource;
	}

	@Override
	public SecurityService getSecurityService() {		
		return new JDBCSecurityService(dataSource);
		
	}
	
	@Override
	public DipendentiService getDipendentiService() {		
		return new JDBCDipendentiService(dataSource);
	}

	@Override
	public PermessiService getPermessiService() {
		return new JDBCPermessiService(dataSource);
	}

	@Override
	public FerieService getFerieService() {
		return new JDBCFerieService(dataSource);
	}

	@Override
	public SediService getSediService() {
		return new JDBCSediService(dataSource);
	}

	@Override
	public RuoliService getRuoliService() {
		return new JDBCRuoliService(dataSource);
	}

	@Override
	public AttivitaService getAttivitaService() {
		return new JDBCAttivitaService(dataSource);
	}

	@Override
	public PresenzeService getPresenzeService() {
		return new JDBCPresenzeService(dataSource);
	}

	@Override
	public GiorniLavorativiService getGiorniLavorativiService() {
		return new JDBCGiorniLavorativiService(dataSource);
	}
	
	
}
